GBML manual / Drawing

sprite_effect_strength_get

The strength, in percent, of a sprite effect playing on this object: 100 when it is not playing or its strength was never set.

Works differently on Game Boy - sprite_effect_strength_get gives the percent set with sprite_effect_strength on the Game Boy, 100 when the effect is not playing on the object.

Works differently on Game Boy Color - sprite_effect_strength_get gives the percent set with sprite_effect_strength on the Game Boy Color, 100 when the effect is not playing on the object.

Works differently on Sega Genesis - The Sega Genesis plays a sprite effect its own way. This version plays the Tint track (the object's colors mixed toward the effect's color, with the effect's timing). A sprite cannot be bent, turned, resized, blocked or faded here, so the Wobble, Distort, Scale, Rotate, Blocks and See-through tracks do not show (the build says which effect has one); use Make a sprite from this effect for those.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

sprite_effect_strength_get(effect) -> int

Arguments

NameType
effectoverlay

Returns

int

Description

Gives back the strength, in percent, of the sprite effect playing on this object: 100 when it is not playing, or its strength was never set with sprite_effect_strength.

Example

if (sprite_effect_strength_get(se_doc_hit) < 100) {
    x += 1;
}

The walker steps to the right while its effect is held below full strength.

See also: Overlay effects - screen effects you make yourselfsprite_effect_strengthsprite_effect_start